package org.hospital.service;

import java.util.List;

import org.hospital.entity.MedicalCard;
import org.hospital.entity.MedicalRecord;
import org.hospital.entity.TreatInfo;

import com.alibaba.fastjson.JSONArray;

public interface MedicalCardService {
	/**
	 * 获取持久化对象
	 * 
	 * @param billId
	 * @return
	 */
	MedicalCard getById(int billProjectId);

	/**
	 * merge 方法插入 数据库
	 * 
	 * @param entity
	 * @return
	 */
	MedicalCard addEntity(MedicalCard entity);

	/**
	 * merge 方法插入 数据库
	 * 
	 * @param entity
	 * @return
	 */
	MedicalCard saveEntity(MedicalCard entity);

	/**
	 * merge 方法批量插入 数据库
	 * 
	 * @param mcList
	 * @return
	 */
	List<MedicalCard> addEntityList(List<MedicalCard> mcList);

	/**
	 * 保存客户治疗记录
	 * 
	 * @param ti
	 * @return
	 */
	TreatInfo createTreatInfo(int projectId, int clientId, int excutorId);

	/**
	 * 获取用户治疗卡信息
	 * 
	 * @param clientId
	 * @return [{projectId,projectName,totoalNumber}]
	 */
	JSONArray getMedicalCardInfo(int clientId);

	/**
	 * 获取用户治疗信息
	 * 
	 * @param clientId
	 * @return 
	 *         [{clinicId,clinicName,departmentId,departmentName,excutorName,excutorId
	 *         ,treatTime}]
	 */
	JSONArray getClientTreatInfo(int clientId);
	
	/**
	 * 保存病例信息
	 * @param mr
	 * @return
	 */
	MedicalRecord creatrMedicalRecord(MedicalRecord mr);
	
	/**
	 * 获取客户病例信息
	 * @param clientId
	 * @return
	 */
	JSONArray getClientMedicalRecord(int clientId);
}
